<template>
	<el-main>
		<el-form>
			<div style="text-align: center;font-weight: 600;font-size: 16px">
				【{{form.sortName}}】{{ form.title }}
			</div>
			<div style="margin:20px 0px 20px 0px">
				<div style="display: inline-block">开始时间:{{ form.beginTime }}</div>
				<div style="display: inline-block;float: right;">结束时间:{{ form.endTime }}</div>
			</div>
			<div style="margin:20px 0px 20px 0px">
				<div style="display: inline-block">值班人:{{ form.dutyUserName }}</div>
				<div style="display: inline-block;float: right;">联系电话:{{ form.tel }}</div>
			</div>
		</el-form>
	</el-main>
</template>

<script>
export default {
	emits: ['success', 'closed'],
	components: {
	},
	data() {
		return {
			loading: false,
			processList:[],
			form: {
				recordId: this.$route.query.recordId,
				title: '',
				sortName: '',
				sortNo: 0,
				beginTime: '',
				endTime: '',
				dutyUserName: '',
				tel:'',
			},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {
		this.getDutyRecordById();
	},
	methods: {
		async getDutyRecordById()
		{
			let res = await this.$API.office.duty.getDutyRecordById.get({recordId:this.form.recordId});
			{
				if(res.code==200)
				{
					this.form.title = res.data.title
					this.form.sortName = res.data.sortName
					this.form.sortNo = res.data.sortNo
					this.form.beginTime = res.data.beginTime
					this.form.endTime = res.data.endTime
					this.form.dutyUserName = res.data.dutyUserName
					this.form.tel = res.data.tel
				}else
				{
					this.$alert(res.message, "提示", {type: 'error'})
				}
			}
		}
	}
}
</script>

<style>
</style>
